package com.gxc.healthfood.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
import lombok.Data;

/**
 * 餐次食物关联实体类
 * @TableName meal_foods
 */
@TableName(value ="meal_foods")
@Data
public class MealFoods implements Serializable {
    /**
     * 主键ID
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 餐次ID
     */
    @TableField(value = "meal_id")
    private Long mealId;

    /**
     * 食物ID
     */
    @TableField(value = "food_id")
    private Long foodId;

    /**
     * 食物数量(克)
     */
    @TableField(value = "amount")
    private BigDecimal amount;

    /**
     * 热量(kcal)
     */
    @TableField(value = "calories")
    private BigDecimal calories;

    /**
     * 蛋白质(g)
     */
    @TableField(value = "protein")
    private BigDecimal protein;

    /**
     * 脂肪(g)
     */
    @TableField(value = "fat")
    private BigDecimal fat;

    /**
     * 碳水化合物(g)
     */
    @TableField(value = "carbohydrate")
    private BigDecimal carbohydrate;

    /**
     * 创建时间
     */
    @TableField(value = "created_at")
    private Date createdAt;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;
}